<%@include file="../header.jsp" %>
<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
<!-- start content -->
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		<h1>Kelola Yudisium</h1>
	</div>
	<!-- end page-heading -->
    
    <!-- start search -->
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
      <tr>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
                                              
		<div id="table-content">                		 
                                <script>
                                function validateFormYudisium()
                                {
                                if (document.tambahPeriode.periode.value=="")
                                {
                                alert("Periode harus diisi !");
                                document.tambahPeriode.periode.focus();
                                return false;
                                }
                                else if (document.tambahPeriode.tglMulai.value == "")
                                {
                                alert("Tanggal awal harus diisi !");
                                document.tambahPeriode.tglMulai.focus();
                                return false;
                                }
                                else if (document.tambahPeriode.tglAkhir.value == "")
                                {
                                alert("Tanggal akhir harus diisi !");
                                document.tambahPeriode.tglAkhir.focus();
                                return false;
                                }
                                else if (document.tambahPeriode.tglMulai.value > document.tambahPeriode.tglAkhir.value)
                                {
                                alert("Tanggal akhir harus lebih besar dari tanggal awal !");
                                return false;    
                                }
                                }
                                </script>
                                <table border="0" width="100%" cellpadding="100" cellspacing="0">                               
                                <form name="tambahPeriode" action="SidangTAController?page=inputYudisium" onSubmit="return validateFormYudisium()" method="post">    
                                <tbody>
                                <tr>
                                <th width="130" >Periode </th>
                                <td width="29" valign="middle" align="center">:</td>
                                <td width="403">
                                    <input name="periode" class="inp-form" type="text"></input>
                                </td>
                                <td width="187" ></td>
                                
                                <th width="130" >Tanggal Mulai</th>
                                <td width="29" valign="middle" align="center">:</td>
                                <td width="403"><input id="tanggalMulai" name="tglMulai" class="inp-form" type="text" ></input></td>
                                <td width="187" ></td>
                                
                                <th width="130" >Tanggal Akhir</th>
                                <td width="29" valign="middle" align="center">:</td>
                                <td width="403"><input id="tanggalSelesai" name="tglAkhir" class="inp-form" type="text" ></input></td>
                                <td width="187" ></td>
                                
                                <th>&nbsp;</th>
                                <td valign="top">&nbsp;</td>
                                <td valign="top"><input value="" class="form-tambah" type="submit" /></input>
                                <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td></td>
                                    <td valign="top"><font size="1"><i>(format : YYYY(GANJIL)/YYYY(GENAP))</i></font></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td valign="top"><font size="1"><i>(format : YYYY/MM/DD)</i></font></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td valign="top"><font size="1"><i>(format : YYYY/MM/DD)</i></font></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                </tr>
                                </tbody>
                                </form>
                                </table>
                                <br>
                            
                                <c:if test="${pesan == 'sukses tambah yudisium'}">
				<!--  start message-green -->
				<div id="message-green">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Yudisium ${periode} berhasil ditambahkan</td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-green -->
                                </c:if>
                                
                                <c:if test="${pesan == 'gagal tambah yudisium'}">
                                <!--  start message-red -->
				<div id="message-red">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="red-left">Yudisium ${periode} gagal ditambahkan</td>
					<td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-red -->
                                </c:if>
                                
                                <c:if test="${pesan == 'sukses update yudisium'}">
				<!--  start message-green -->
				<div id="message-green">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Update yudisium ${periode} berhasil dilakukan</td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-green -->
                                </c:if>
                                
                                <c:if test="${pesan == 'gagal update yudisium'}">
                                <!--  start message-red -->
				<div id="message-red">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="red-left">Update yudisium ${periode} gagal dilakukan</td>
					<td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-red -->
                                </c:if>
                                
                                <c:if test="${pesan == 'sukses hapus periode'}">
				<!--  start message-green -->
				<div id="message-green">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="green-left">Periode ${periode} berhasil dihapus</td>
					<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"  alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-green -->
                                </c:if>
                                
                                <c:if test="${pesan == 'gagal hapus periode'}">
                                <!--  start message-red -->
				<div id="message-red">
				<table border="0" width="100%" cellpadding="0" cellspacing="0">
				<tr>
					<td class="red-left">Periode ${periode} gagal dihapus</td>
					<td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
				</tr>
				</table>
				</div>
				<!--  end message-red -->
                                </c:if>
                                
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">			
				<tr>
				  <th class="table-header-repeat line-left "><a href="">No</a></th>
				  <th class="table-header-repeat line-left "><a href="">Periode</a></th>
                                  <th class="table-header-repeat line-left "><a href="">Tanggal Mulai</a></th>
                                  <th class="table-header-repeat line-left "><a href="">Tanggal Akhir</a></th>
				  <th class="table-header-repeat line-left "><a href="">Pilihan</a></th>
				</tr>
                                <c:if test="${empty listYudisium}">
                                <tr>
                                    <td colspan="5" align="center" >Belum ada periode yudisium yang berjalan</td>
                                </tr>
                                </c:if>
                                <% int i = 1;%>
                                <c:forEach items="${listYudisium}" var="listYudisium">
				<tr>
                                        <td align="center"><% out.print(i); i++; %></td>
                                        <td>${listYudisium.periode}</td>
					<td>${listYudisium.tglMulai}</td>
                                        <td>${listYudisium.tglAkhir}</td>
					<td class="options-width">
                                            <a href="SidangTAController?page=detailYudisium&&periode=${listYudisium.periode}" title="detail yudisium" class="icon-1 info-tooltip"></a>
                                            <a href="SidangTAController?page=hapusYudisium&&periode=${listYudisium.periode}" onclick="return confirm('Apakah anda ingin menghapus periode yudisium ${listYudisium.periode}')" title="Hapus" class="icon-2 info-tooltip"></a>
                                        </td>
				</tr>
                                </c:forEach>
                                </table>				
			</div>
			<!--  end content-table  -->
		
			<!--  start actions-box ............................................... --><!-- end actions-box........... -->
			
			<!--  start paging..................................................... -->
			
			<!--  end paging................ -->
			
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>
<!--  end content -->
<div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->

<div class="clear">&nbsp;</div>
    
<!-- start footer -->         
<div id="footer">
	<!--  start footer-left -->
	<div id="footer-left">
	
	Admin Skin &copy; Copyright Internet Dreams Ltd. <span id="spanYear"></span> <a href="">www.netdreams.co.uk</a>. All rights reserved.</div>
	<!--  end footer-left -->
	<div class="clear">&nbsp;</div>
</div>
<!-- end footer -->
 
</body>
</html>